package com.fsy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fsy.entities.Askers;
import com.fsy.entities.Students;
import com.fsy.service.AskersService;
import com.fsy.mapper.AskersMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 凡凡
* @description 针对表【askers】的数据库操作Service实现
* @createDate 2022-04-29 11:18:39
*/
@Service
public class AskersServiceImpl extends ServiceImpl<AskersMapper, Askers>
    implements AskersService{

    @Resource
    private AskersMapper askersMapper;


    @Override
    public int deleteByAskerId(Integer askerId) {
        return askersMapper.deleteByAskerId(askerId);
    }

    @Override
    public List<Askers> findAllAskers(Askers askers) {
        askers.setPage((askers.getPage()-1)*askers.getLimit());
        return askersMapper.findAllAskers(askers);
    }

    @Override
    public int selectCounts(Askers askers) {
        return askersMapper.selectCounts(askers);
    }

    @Override
    public List<Askers> findTodayCheckInAsker() {
        return baseMapper.findTodayCheckInAsker();
    }

    @Override
    public List<Students> findeNeedAllocateStudent() {
        return baseMapper.findeNeedAllocateStudent();
    }
}




